package com.h2n.framework.dto;

import java.util.Date;
import java.util.Map;
import java.util.HashMap;

/**
 * Created by IntelliJ IDEA.
 * User: NhatNV
 * Date: Jul 30, 2009
 * Time: 12:41:23 AM
 * To change this template use File | Settings | File Templates.
 */
public class MemberDTO {

  private int id;
  public void setId(int id){
    this.id = id;
  }
  public int getId(){
    return this.id;
  }

  private String user_Name;
  public void setUser_Name(String _userName){
    this.user_Name = _userName;
  }
  public String getUser_Name(){
    return this.user_Name;
  }

  private String password;
  public void setPassword(String _password){
    this.password = _password;
  }
  public String getPassword(){
    return this.password;
  }

  private int user_Id;
  public int getUser_Id(){
    return this.user_Id;
  }
  public void setUser_Id(int _userId){
    this.user_Id = _userId;
  }

  private Date insert_Date;
  public void setInsert_Date(Date _insertDate){
    this.insert_Date = _insertDate;
  }
  public Date getInsert_Date(){
    return this.insert_Date;
  }

  private int status = 0;
  public void setStatus(int _status){
    this.status = _status;
  }
  public int getStatus(){
    return this.status;
  }

  private Date last_Change_Password;
  public void setLast_Change_Password(Date _lastChangePassword){
    this.last_Change_Password = _lastChangePassword;
  }
  public Date getLast_Change_Password(){
    return this.last_Change_Password;
  }

  private int logined_Fail_Count = 0;
  public void setLogined_Fail_Count(int _loginedFailCount){
    this.logined_Fail_Count = _loginedFailCount;
  }
  public int getLogined_Fail_Count(){
    return this.logined_Fail_Count;
  }

  private Date last_Logined;
  public void setLastLogined(Date lastLogined){
    this.last_Logined = lastLogined;
  }
  public Date getLastLogined(){
    return this.last_Logined;
  }

  private String language = "English";
  public void setLanguage(String language){
    this.language = language;
  }
  public String getLanguage(){
    return this.language;
  }

  private int group_Id;
  public void setGroup_Id(int _groupId){
    this.group_Id = _groupId;
  }
  public int getGroup_Id(){
    return this.group_Id;
  }

  public static final String INSERT_PROCEDURE = "members_insert";
  public static final String UPDATE_PROCEDURE = "members_update";
  public static final String DELETE_PROCEDURE = "members_delete";
  public static final String GET_INFO_PROCEDURE = "members_get_info";
  public static final String GET_INFO_BY_UID_PROCEDURE = "members_get_info_by_uid";
  public static final String GET_ALL_PROCEDURE = "members_get_all";

  public Map getMap(){
    Map map = new HashMap();
    map.put(Parameters.p_id.toString(),this.id);
    map.put(Parameters.p_user_name.toString(),this.user_Name);
    map.put(Parameters.p_password.toString(),this.password);
    map.put(Parameters.p_user_id.toString(),this.user_Id);
    map.put(Parameters.p_insert_date.toString(),this.insert_Date);
    map.put(Parameters.p_status.toString(),this.status);
    map.put(Parameters.p_last_change_password.toString(),this.last_Change_Password);
    map.put(Parameters.p_logined_fail_count.toString(),this.logined_Fail_Count);
    map.put(Parameters.p_last_logined.toString(),this.last_Logined);
    map.put(Parameters.p_language.toString(),this.language);
    map.put(Parameters.p_group_id.toString(),this.group_Id);

    return map;
  }

  public enum Parameters{
    p_id,
    p_user_name,
    p_password,
    p_user_id,
    p_insert_date,
    p_status,
    p_last_change_password,
    p_logined_fail_count,
    p_last_logined,
    p_language,
    p_group_id;
  }
}
